﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace ListDemos.ListViwer
{
    [ToolboxItemAttribute(false)]
    public class ListViwer : WebPart
    {
        protected override void CreateChildControls()
        {
            /* Web object */
            SPWeb web = SPContext.Current.Web;
            foreach (SPList list in web.Lists)
            {
                Controls.Add(new LiteralControl(list.Title + "," + list.ID + @"<br/>"));
            }
        }
    }
}
